CASTING INPUT: Let's ask for user input that we can use to throw a basketball!

User input can be cast from a string to other data types, such as an integer or float.

  • In GRAPHICS click then drag two Ask for Integer blocks to the bottom of the code editor.
  • Change the first input variable from guess to x_speed and the second from guess to y_speed.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)